<template>
   <textarea ref="textareaRef" class="textarea">
      width: {{width}}
      height: {{height}}
   </textarea>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { useElementSize } from 'useless/core'

const textareaRef = ref(null)
const { height, width } = useElementSize(textareaRef)

</script>

<style>
.textarea {
    resize: both;
    min-height: 6rem;
    min-width: 10rem;
}
</style>